package com.yunhe.abnormal.consts;

public class AlarmConsts {
    /**
     * 异常等级
     */
    public enum ALARMLEVEL {
        IGNORE("1", "忽略"),
        SLIGHT("2", "通知"),
        MODERATE("3", "预警"),
        SERIOUS("4", "故障");
        private String name;
        private String title;
        ALARMLEVEL(String name, String title) {
            this.name = name;
            this.title = title;
        }
        public String getName() {
            return name;
        }
        public String getTitle() {
            return title;
        }
    }

    /**
     * 异常作用范围
     */
    public enum AlarmScope {
        STATION("station", "电站"),
        DEVICE("device", "设备");
        private String value;
        private String title;
        AlarmScope(String value, String title) {
            this.value = value;
            this.title = title;
        }
        public String value() {
            return value;
        }
        public String title() {
            return title;
        }
    }

    /**
     * 异常通知类型
     */
    public enum AlarmNotifyType {
        POPUP("popup", "桌面通知"),
        ACOUSTO_OPTIC("acoustoOptic", "声光通知"),
        SMS("sms", "短信通知");
        private String value;
        private String title;
        AlarmNotifyType(String value, String title) {
            this.value = value;
            this.title = title;
        }
        public String value() {
            return value;
        }
        public String title() {
            return title;
        }
        public boolean equals(String value) {
            return this.value().equals(value);
        }
    }

    /**
     * 异常通知配置类型
     */
    public enum AlarmNotifyConfigType {
        FIRM(0, "运营商"),
        USER(1, "个人");
        private Integer value;
        private String title;
        AlarmNotifyConfigType(Integer value, String title) {
            this.value = value;
            this.title = title;
        }
        public Integer value() {
            return value;
        }
        public String title() {
            return title;
        }
        public boolean equals(Integer value) {
            return this.value().equals(value);
        }
    }

    /**
     * 异常通知状态
     */
    public enum AlarmNotifyStatus {
        CLOSED(0, "关闭"),
        OPENED(1, "打开");
        private Integer value;
        private String title;
        AlarmNotifyStatus(Integer value, String title) {
            this.value = value;
            this.title = title;
        }
        public Integer value() {
            return value;
        }
        public String title() {
            return title;
        }
        public boolean equals(Integer value) {
            return this.value().equals(value);
        }
    }
}
